﻿namespace Leo.Common.MQ
{
    public interface IMQProducer
    {
        MessageQueueType QueueType { get; }


        Task<bool> ProduceAsync(IMessageModel message);

        Task<bool> ProduceAsync<T>(T data, string destination);


        Task<bool> ProduceAsync<T>(T data, string destination, MessageProperty property);
    }

    public interface IMQProducer<T> : IMQProducer where T : IMessageModel
    {
        Task<bool> ProduceAsync(T data);
    }
}
